package org.zh.svs.pro.remote;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.zh.client.ann.ZHOpenService;
import org.zh.svs.pro.entity.Student;

import java.time.LocalDateTime;
import java.util.Map;


@ZHOpenService
@RestController
public class ProRemoteImpl implements ProRemote {

    @RequestMapping(method = RequestMethod.POST, path = "/testC")
    public Student testC(@RequestBody Map<String, Long> teacher) {
        System.out.println(teacher.get("teacher_id"));
        return getOne();
    }

    private static Student getOne(){
        Student student = new Student();
        student.setStudentAddress("sss");
        student.setStudentAge(34);
        student.setStudentBirthday(LocalDateTime.now());
        student.setStudentEthnicGroup("中國");
        student.setStudentGender("男");
        student.setStudentName("zhanfg");
        student.setStudentPhoneNumber("18515630996");
        student.setStudentId(3333L);
        return student;
    }


}
